nbiot6 2.2.1
Loading...
Searching...
No Matches
nbiot6.h File Reference

This file contains API for NB IoT 6 Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_uart.h"

Go to the source code of this file.

Data Structures

struct  nbiot6_t
 NB IoT 6 Click context object. More...
struct  nbiot6_cfg_t
 NB IoT 6 Click configuration object. More...

Macros

#define NBIOT6_CMD_AT   "AT"
 NB IoT 6 control commands.
#define NBIOT6_CMD_GET_MODEL_ID   "AT+CGMM"
#define NBIOT6_CMD_GET_MANUFACTURER_REVISION   "AT+CGMR"
#define NBIOT6_CMD_GET_SERIAL_NUM   "AT+CGSN"
#define NBIOT6_CMD_SET_UE_FUNCTIONALITY   "AT+CFUN"
#define NBIOT6_CMD_NETWORK_REGISTRATION   "AT+CEREG"
#define NBIOT6_CMD_SIGNAL_QUALITY_REPORT   "AT+CSQ"
#define NBIOT6_CMD_OPERATOR_SELECTION   "AT+COPS"
#define NBIOT6_CMD_SEND_SMS   "AT+CMGS"
#define NBIOT6_CMD_SELECT_SMS_FORMAT   "AT+CMGF"
#define NBIOT6_CMD_DEFINE_PDP_CONTEXT   "AT+CGDCONT"
#define NBIOT6_CMD_ACTIVATE_PDP_CONTEXT   "AT+CGACT"
#define NBIOT6_CMD_SHOW_PDP_ADDRESS   "AT+CGPADDR"
#define NBIOT6_CMD_OPEN_SOCKET   "AT+QIOPEN"
#define NBIOT6_CMD_CLOSE_SOCKET   "AT+QICLOSE"
#define NBIOT6_CMD_SEND_TCP_IP_TEXT_DATA   "AT+QISEND"
#define NBIOT6_CMD_RECEIVE_TCP_IP_DATA   "AT+QIRD"
#define NBIOT6_CMD_CONFIG_NETLIGHT_LED   "AT+QLEDMODE"
#define NBIOT6_RSP_OK   "OK"
 NB IoT 6 device response for AT commands.
#define NBIOT6_RSP_ERROR   "ERROR"
#define NBIOT6_RSP_CLOSE_OK   "CLOSE OK"
#define NBIOT6_MAX_RSP_TIME_DEFAULT   300ul
 NB IoT 6 device response time for AT commands.
#define NBIOT6_MAX_RSP_TIME_COPS   630000ul
#define NBIOT6_MAX_RSP_TIME_CGACT   150000ul
#define NBIOT6_MAX_RSP_TIME_CFUN   90000ul
#define NBIOT6_MAX_RSP_TIME_CMGS   30000ul
#define NBIOT6_MAX_RSP_TIME_QICLOSE   15000ul
#define NBIOT6_MAX_RSP_TIME_URC   15000ul
#define NBIOT6_URC_OPEN_SOCKET   "+QIOPEN: "
 NB IoT 6 device unsolicited response code (URC) settings.
#define NBIOT6_URC_RECEIVED_DATA   "+QIURC: \"recv\""
#define NBIOT6_URC_NETWORK_REGISTERED   "+CEREG: 2,1"
#define NBIOT6_URC_SMS_FORMAT_PDU   "+CMGF: 0"
#define NBIOT6_URC_SMS_FORMAT_TXT   "+CMGF: 1"
#define NBIOT6_POWER_STATE_OFF   0
 NB IoT 6 power state settings.
#define NBIOT6_POWER_STATE_ON   1
#define NBIOT6_POWER_STATE_RESET   2
#define NBIOT6_POWER_STATE_WAKEUP   3
#define NBIOT6_TX_DRV_BUFFER_SIZE   256
 NB IoT 6 driver buffer size.
#define NBIOT6_RX_DRV_BUFFER_SIZE   256
#define NBIOT6_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.

Enumerations

enum  nbiot6_return_value_t { NBIOT6_OK = 0 , NBIOT6_ERROR = -1 , NBIOT6_ERROR_TIMEOUT = -2 , NBIOT6_ERROR_CMD = -3 }
 NB IoT 6 Click return value data. More...

Functions

void nbiot6_cfg_setup (nbiot6_cfg_t *cfg)
 NB IoT 6 configuration object setup function.
err_t nbiot6_init (nbiot6_t *ctx, nbiot6_cfg_t *cfg)
 NB IoT 6 initialization function.
err_t nbiot6_generic_write (nbiot6_t *ctx, uint8_t *data_in, uint16_t len)
 NB IoT 6 data writing function.
err_t nbiot6_generic_read (nbiot6_t *ctx, uint8_t *data_out, uint16_t len)
 NB IoT 6 data reading function.
void nbiot6_set_pwr_pin (nbiot6_t *ctx, uint8_t state)
 NB IoT 6 set PWR pin function.
void nbiot6_set_rst_pin (nbiot6_t *ctx, uint8_t state)
 NB IoT 6 set RST pin function.
void nbiot6_set_wup_pin (nbiot6_t *ctx, uint8_t state)
 NB IoT 6 set WUP pin function.
uint8_t nbiot6_get_ring_pin (nbiot6_t *ctx)
 NB IoT 6 get RING pin function.
void nbiot6_set_power_state (nbiot6_t *ctx, uint8_t state)
 NB IoT 6 set power state function.
void nbiot6_cmd_run (nbiot6_t *ctx, uint8_t *cmd)
 NB IoT 6 cmd run function.
void nbiot6_cmd_set (nbiot6_t *ctx, uint8_t *cmd, uint8_t *value)
 NB IoT 6 cmd set function.
void nbiot6_cmd_get (nbiot6_t *ctx, uint8_t *cmd)
 NB IoT 6 cmd get function.
void nbiot6_cmd_help (nbiot6_t *ctx, uint8_t *cmd)
 NB IoT 6 cmd help function.
void nbiot6_set_sim_apn (nbiot6_t *ctx, uint8_t *sim_apn)
 NB IoT 6 set sim card APN function.
void nbiot6_send_sms_text (nbiot6_t *ctx, uint8_t *phone_number, uint8_t *sms_text)
 NB IoT 6 send SMS in text mode function.
err_t nbiot6_send_sms_pdu (nbiot6_t *ctx, uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text)
 NB IoT 6 send SMS in PDU mode function.

Detailed Description

This file contains API for NB IoT 6 Click Driver.

Enumeration Type Documentation

◆ nbiot6_return_value_t

NB IoT 6 Click return value data.

Predefined enum values for driver return values.

Enumerator
NBIOT6_OK 
NBIOT6_ERROR 
NBIOT6_ERROR_TIMEOUT 
NBIOT6_ERROR_CMD